function M = ave(A)
global nx ny nz
% M = zeros(Nx+2,Ny+2,Nz+2);
M1 = mean(A,2);
M = repmat(M1,1,ny);
end
